export default {
  namespaced: true, //开启命名空间
  state: {
    arr: ['a', 'b', 'c'],
  },
  getters: {
    arrLength(state) {
      return state.arr.length
    },
  },
  actions: {
    cut({ commit }, index) {
      commit('splice', index)
    },
  },
  mutations: {
    splice(state, index) {
      state.arr.splice(index, 1)
    },
  },
}
